<template>
    <div id='wrap'>
        <h1>setup语法糖</h1>
        <p>{{ str }}</p>
        <p>{{ str1 }}</p>
        <button @click="changestr()">点击我改变文字</button>
    </div>
</template>
<script lang='ts'>
export default {
    name: 'studemo7',
}
</script>
<script lang='ts' setup>
import { ref } from 'vue';
import { h } from 'vue';
const str = ref('我是组合式的普通变量');
const str1 = ref<string>('我是组合式的响应变量')
const changestr = () => {
    str.value = '我是组合式的普通变量修改后的值'
    str1.value = '我是组合式的响应变量修改后的值'
}

</script>
<style lang='scss'>
#wrap {
    width: 100%;
    height: 100%;
    display: flex;
    text-align: center;
    font-size: 18px;
    flex-direction: column;
    justify-content: start;
    gap: 20px;

    h1 {
        font-size: 50px;
        margin-bottom: 20px;
        color: rgb(243, 231, 233);
    }

    img {
        display: block;
        width: 200px;
        height: 150px;
        margin: 0 auto;
    }

    button {
        width: 150px;
        height: 50px;
        margin: 0 auto;
        background: linear-gradient(200deg, #f3e7e9, #e3eeff);
    }
}
</style>